<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
    String path = request.getContextPath();
%>
<html>
<head>
    <meta charset="utf-8">
    <title>等你回家</title>
<%--    <link rel="icon" href="<%=path%>/web/static/images/favicon.png" type="image/png" sizes="32x32">--%>
    <link href="<%=path%>/web/index/css/bootstrap.css" rel="stylesheet" type="text/css" media="all" />
    <link href="<%=path%>/web/index/css/style.css" rel="stylesheet" type="text/css" media="all" />

    <link href="<%=path%>/web/static/css/informationList.css" rel="stylesheet"/>
<%--    <link rel="stylesheet" href="<%=path%>/web/static/css/style.css">--%>
    <script type="text/javascript" src="<%=path%>/web/static/js/modules/jquery-3.3.1.min.js"></script>
</head>
<body style="background: #f7f7f7">
<!--header-->
<div class="banner-in">
    <div class="container">
        <h6>等你回家 / <span>寻亲列表</span></h6>
    </div>
</div>
<!--header-->
<div class="header">
    <div class="container">
        <div class="logo">
            <a href="<%=path %>/web/index"><img src="<%=path %>/web/index/images/logo.png" alt=" " /></a>
        </div>
        <div class="top-nav">
            <span class="menu"> </span>
            <ul>
                <li><a href="${pageContext.request.contextPath}/web/index" class="scroll">首页</a></li>
                <li><a href="<%=path %>/web/information/chooseType" class="scroll">你在哪儿</a></li>
                <li class="active"><a href="<%=path %>/web/information/informationList?lostTypeId=0" class="scroll">我想回家</a></li>
                <li><a href="<%=path %>/web/blogger/blog" class="scroll">日志论坛</a></li>
                <li><a href="<%=path %>/web/task/releaseTask" class="scroll">任务列表</a></li>
                <c:if test="${empty(sessionScope.userinfo)}" var="result">
                    <li><a href="<%=path %>/web/userinfo/register" class="scroll">注册</a>|<a href="<%=path %>/web/userinfo/login" class="scroll">登录</a></li>
                </c:if>
                <c:if test="${not result}">
                    <li><a href="<%=path%>/web/userinfo/applyVolunteer" class="scroll">加入我们</a></li>
                    <c:if test="${(sessionScope.userinfo.username eq '')||(sessionScope.userinfo.username eq NULL)}" var="result">
                        <span style="color:white">欢迎<a href="<%=path %>/web/userinfo/index" style="color: white" href="">${sessionScope.userinfo.phone}</a></span>
                    </c:if>
                    <c:if test="${not result}">
                        <span style="color:white">欢迎<a href="<%=path %>/web/userinfo/index" style="color: white" href="">${sessionScope.userinfo.username}</a></span>
                    </c:if>
                    <span style="color: white">|</span>

                    <span style="color:white"><a style="color: white" href="<%=path %>/web/userinfo/logout">注销</a></span>
                    <span style="color: white">|</span>
                    <label><img style="width:30px;height: 30px" src="<%=path %>/web/uploadImages/${sessionScope.userinfo.pic}"></label>
                </c:if>
            </ul>
            <!--script-->
            <script>
                $("span.menu").click(function(){
                    $(".top-nav ul").slideToggle(500, function(){
                    });
                });
            </script>
        </div>
        <div class="clearfix"> </div>
    </div>
</div>
<!---->
<div  class="main">
<div style="margin-top:-50px;margin-bottom:20px" >
    <div style="width:1100px;">
        <table class="search-tab" style="margin:auto">
            <tr>
                <th width="50">搜索:</th>
                <td><input class="common-text" placeholder="搜索" name="keywords"  id="matter" type="text" style="height:40px;"></td>
                <td><input class="btn btn-primary btn2" name="sub" value="查询" id="seek" type="button"></td>
            </tr>
        </table>
    </div>
    <div class="select" style="position:absolute;left:1200px;top:280px">
        <select id="leixing">
            <option>请选择</option>
            <option value="0">全部</option>
            <c:forEach items="${requestScope.lostTypes}" var="lostType">
                <option  value="${lostType.id}">${lostType.title}</option>
            </c:forEach>
        </select>
    </div>
</div>
</div>


<div class="sousuo">
<div id="yhc_responsive" class="main">
    <div class="allProduct respl-header">
        <ul class="ProductList respl-items">
            <c:forEach items="${requestScope.pageInfo.list}" var="information" varStatus="stat">
            <li class="respl-item category-10">
                <div class="unit">
                    <a class="images" href="<%=path%>/web/information/showList?id=${information.id}"><img src="<%=path %>/web/uploadImages/${information.pic}"></a>
                    <h1><a href="<%=path%>/web/information/showList?id=${information.id}">${information.name}</a></h1>
                    <dl>
                        <dd>${information.sex}</dd>
                        <dd>${information.losttype.title}</dd>
                        <dd>失踪地点:${information.lostPlace}</dd>
                    </dl>
                    <div class="view">
                        <div class="left">${information.browse}浏览</div>
                        <a class="right" href="<%=path%>/web/information/showList?id=${information.id}">查看<span>&gt;</span></a>
                    </div>
                </div>
            </li>
            </c:forEach>
        </ul>
    </div>
</div>

<c:if test="${information.lostTypeId eq 0}">
       <div class="biankuang" style="text-align:center;margin-bottom:20px">
           <td colspan="7">
               <a href="<%=path%>/web/information/informationList?lostTypeId=0&&pageNum=1" id="ids" class="num" style=" display: inline-block;width: 50px;height: 50px;border: #c3c0bf solid  1px;text-align: center;line-height: 50px;border-radius: 0;" id="${i}">首页</a>
               <c:forEach  items="${requestScope.pageInfo.navigatepageNums}" var="i">
                   <c:if test="${requestScope.pageInfo.pageNum eq i}" var="isCur">
                       <a href="#"><span style="color:red;border:1px solid grey;padding:14px 20px; ">${i}</span></a>&nbsp;
                   </c:if>
                   <c:if test="${not isCur}">
                   <a href="<%=path%>/web/information/informationList?lostTypeId=0&&pageNum=${i}" id="ids" class="num" style=" display: inline-block;width: 50px;height: 50px;border: #c3c0bf solid  1px;text-align: center;line-height: 50px;border-radius: 0;" id="${i}">${i}</a>
                   </c:if>
               </c:forEach>
           </td>
       </div>
</c:if>


<c:if test="${information.lostTypeId eq 1}">
    <div class="biankuang" style="text-align:center;margin-bottom:20px">
        <td colspan="7">
            <a href="<%=path%>/web/information/informationList?lostTypeId=1&&pageNum=1" id="ids" class="num" style=" display: inline-block;width: 50px;height: 50px;border: #c3c0bf solid  1px;text-align: center;line-height: 50px;border-radius: 0;" id="${i}">首页</a>
            <c:forEach  items="${requestScope.pageInfo.navigatepageNums}" var="i">
                <c:if test="${requestScope.pageInfo.pageNum eq i}" var="isCur">
                    <a href="#"><span style="color:red;border:1px solid grey;padding:14px 20px; ">${i}</span></a>&nbsp;
                </c:if>
                <c:if test="${not isCur}">
                <a href="<%=path%>/web/information/informationList?lostTypeId=1&&pageNum=${i}" id="ids" class="num" style=" display: inline-block;width: 50px;height: 50px;border: #c3c0bf solid  1px;text-align: center;line-height: 50px;border-radius: 0;" id="${i}">${i}</a>
                </c:if>
            </c:forEach>
        </td>
    </div>
</c:if>


<c:if test="${information.lostTypeId eq 2}">
    <div class="biankuang" style="text-align:center;margin-bottom:20px">
        <td colspan="7">
            <a href="<%=path%>/web/information/informationList?lostTypeId=2&&pageNum=1" id="ids" class="num" style=" display: inline-block;width: 50px;height: 50px;border: #c3c0bf solid  1px;text-align: center;line-height: 50px;border-radius: 0;" id="${i}">首页</a>
            <c:forEach  items="${requestScope.pageInfo.navigatepageNums}" var="i">
                <c:if test="${requestScope.pageInfo.pageNum eq i}" var="isCur">
                    <a href="#"><span style="color:red;border:1px solid grey;padding:14px 20px; ">${i}</span></a>&nbsp;
                </c:if>
                <c:if test="${not isCur}">
                <a href="<%=path%>/web/information/informationList?lostTypeId=2&&pageNum=${i}" id="ids" class="num" style=" display: inline-block;width: 50px;height: 50px;border: #c3c0bf solid  1px;text-align: center;line-height: 50px;border-radius: 0;" id="${i}">${i}</a>
            </c:if>
            </c:forEach>
        </td>
    </div>
</c:if>


<c:if test="${information.lostTypeId eq 3}">
    <div class="biankuang" style="text-align:center;margin-bottom:20px">
        <td colspan="7">
            <a href="<%=path%>/web/information/informationList?lostTypeId=3&&pageNum=1" id="ids" class="num" style=" display: inline-block;width: 50px;height: 50px;border: #c3c0bf solid  1px;text-align: center;line-height: 50px;border-radius: 0;" id="${i}">首页</a>
            <c:forEach  items="${requestScope.pageInfo.navigatepageNums}" var="i">
                <c:if test="${requestScope.pageInfo.pageNum eq i}" var="isCur">
                    <a href="#"><span style="color:red;border:1px solid grey;padding:14px 20px; ">${i}</span></a>&nbsp;
                </c:if>
                <c:if test="${not isCur}">
                <a href="<%=path%>/web/information/informationList?lostTypeId=3&&pageNum=${i}" id="ids" class="num" style=" display: inline-block;width: 50px;height: 50px;border: #c3c0bf solid  1px;text-align: center;line-height: 50px;border-radius: 0;" id="${i}">${i}</a>
                </c:if>
            </c:forEach>
        </td>
    </div>
</c:if>

</div>
            <script type="text/javascript">


                $(function () {

                    initData(1);

                })

                $(function () {
                    $(".search-tab").on("click","#seek",function () {//solr搜索
                        var title = $("#matter").val();
                        var pageNum=1;
                        sousuoDate(pageNum,title);
                        return false;
                    })

                    $(".sousuo").on("click",".biankuang",function () {//solar搜索页面加点击事件
                        var pageNum = $(this).data("id");
                        initData(pageNum);
                        return false;
                    })
                })



                function sousuoDate(pageNum,title) {//搜索页码加事件
                    $.get("${pageContext.request.contextPath}/web/information/souSuoInformation", {
                        pageNum: pageNum,
                        title: title
                    }, function (mes) {
                        $(".sousuo").empty();
                        $(".sousuo").html(mes);
                    })
                }



                

                $("#leixing").change(function (){
                    var lostTypeId=$("#leixing").val();
                    if(lostTypeId==0){
                        window.location.href="<%=path %>/web/information/informationList?lostTypeId="+lostTypeId;
                    }
                    else if(lostTypeId==1){
                        window.location.href="<%=path %>/web/information/informationList?lostTypeId="+lostTypeId;
                    }else if(lostTypeId==2){
                        window.location.href="<%=path %>/web/information/informationList?lostTypeId="+lostTypeId;
                    }else {
                        window.location.href="<%=path %>/web/information/informationList?lostTypeId="+lostTypeId;
                    }
                })

            </script>

<!--footer-->
<footer>
    <div class="footer" style="height: 230px;">
        <div class="container" style="margin-top: -40px;">
            <p style="font-size: 15px;"><span style="font-size: 20px;">等你回家</span><span >邮箱:1111111@163.com</span> 电话:0532—85025005</p>
            <p class="footer-class" style="font-size:15px;margin-top: -60px;">地址:山东省青岛市市南区中联创意广场B1栋三楼 <a href="http://w3layouts.com/" target="_blank">万码学堂</a></p>
            <p class="footer-class" style="font-size:15px;margin-top: -45px;text-transform: none">Copyright © 2019 www.dengnihuijia.com All rights Reserved.</p>
        </div>
    </div>
</footer>
</body>
<script type="text/javascript" src="<%=path%>/web/static/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="<%=path%>/web/static/js/jquery.isotope.js"></script>
<script type="text/javascript" src="<%=path%>/web/static/js/script.js"></script>
<script type="text/javascript" src="<%=path %>/web/static/js/modules/jquery-3.4.1.min.js"></script>
</html>
